$(document).ready(function(){
    $('.an-classify').children('a').click(function(){
        if($('.an-classify').css('height')=='52px'){
            $('.an-classify').animate({
                'height':104
            },500);
        }else{
            $('.an-classify').animate({
                'height':52
            },500);
        } 
    })

    var tiaozhuan = $('.an-con-left').find('a'),
    aweifenxiao = tiaozhuan[1],
    agonggaoxinwen=tiaozhuan[2],

    agonggao=tiaozhuan[5],
    ashangjiaruzhu=tiaozhuan[6],
    ashangjiagonggao=tiaozhuan[7];
    var nonediv = $('.an-con-rigth').children('div')
    var weifenxiaodiv = nonediv[1],
    gonggaoxinwendiv=nonediv[4],

    gonggaodiv=nonediv[0],
    shangjiaruzhudiv=nonediv[5],
    shangjiagonggaodiv=nonediv[10],

    howtoweifenxiaodiv = nonediv[2],
    whatisweifenxiaodiv = nonediv[3];

    knowmorediv = nonediv[7];
    lianxifangshidiv = nonediv[8];
// 微分销的链接
    var weifenxiaoa = $('.an-micro-distribution').find('a'),
    howtoweifenxiaoa = weifenxiaoa[0],
    whatisweifenxiaoa = weifenxiaoa[1];

//如何成为微分销的链接
    var howtoweifenxiaoa_includea = $(howtoweifenxiaodiv).find('a'),
    how_to_wei =$(howtoweifenxiaoa_includea)[0],
    how_to_what = $(howtoweifenxiaoa_includea)[6];
    
//什么是微分销的链接
    var whatisweifenxiao_includea = $(whatisweifenxiaodiv).find('a'),
    what_to_how = whatisweifenxiao_includea[2],
    what_to_wei = whatisweifenxiao_includea[0];
    
//商家入驻流程说明
    var shangjiaruzhu_includea = $(shangjiaruzhudiv).find('a');
    ruzhu_to_knowmore = shangjiaruzhu_includea[0],
    ruzhu_to_lianxifangshi = shangjiaruzhu_includea[1];
    
    console.log(nonediv)
    // console.log(shangjiaruzhu_includea);
    // console.log(ruzhu_to_knowmore);
    // console.log(ruzhu_to_lianxifangshi);
//二级分类
    var aerji = $(tiaozhuan[4])
    var seconddiv = $(nonediv)[6];
    // console.log(aerji);
    // console.log($(seconddiv))
//测试二级
    // var aceshierji = $(sec);
    var atestsecond = $(seconddiv).find('a')
    console.log(atestsecond);
    var testseconddov = $(nonediv[9])

    $(aweifenxiao).click(function(){
        $(weifenxiaodiv).css('display','block');
        $(weifenxiaodiv).siblings().css('display','none')
    })
    $(agonggaoxinwen).click(function(){
        $(gonggaoxinwendiv).css('display','block');
        $(gonggaoxinwendiv).siblings().css('display','none')
    })
    $(agonggao).click(function(){
        $(gonggaodiv).css('display','block');
        $(gonggaodiv).siblings().css('display','none')
    })
    $(ashangjiaruzhu).click(function(){
        $(shangjiaruzhudiv).css('display','block');
        $(shangjiaruzhudiv).siblings().css('display','none');
    })
    $(ashangjiagonggao).click(function(){
        $(shangjiagonggaodiv).css('display','block');
        $(shangjiagonggaodiv).siblings().css('display','none');
    })
    $(howtoweifenxiaoa).click(function(){
        $(howtoweifenxiaodiv).css('display','block');
        $(howtoweifenxiaodiv).siblings().css('display','none');
    })
    $(whatisweifenxiaoa).click(function(){
        $(whatisweifenxiaodiv).css('display','block');
        $(whatisweifenxiaodiv).siblings().css('display','none');
    })
    $(how_to_wei).click(function(){
        $(weifenxiaodiv).css('display','block');
        $(weifenxiaodiv).siblings().css('display','none')
    })
    $(how_to_what).click(function(){
        $(whatisweifenxiaodiv).css('display','block');
        $(whatisweifenxiaodiv).siblings().css('display','none')
    })

    $(what_to_wei).click(function(){
        $(weifenxiaodiv).css('display','block');
        $(weifenxiaodiv).siblings().css('display','none')
    })
    $(what_to_how).click(function(){
        $(howtoweifenxiaodiv).css('display','block');
        $(howtoweifenxiaodiv).siblings().css('display','none')
    })



    $(ruzhu_to_knowmore).click(function(){
        $(knowmorediv).css('display','block');
        $(knowmorediv).siblings().css('display','none')
    })
    $(ruzhu_to_lianxifangshi).click(function(){
        $(lianxifangshidiv).css('display','block');
        $(lianxifangshidiv).siblings().css('display','none')
    })


    $(aerji).click(function(){
        $(seconddiv).css('display','block');
        $(seconddiv).siblings().css('display','none')
    })
    $(atestsecond).click(function(){
        $(testseconddov).css('display','block');
        $(testseconddov).siblings().css('display','none')
    })

})